/*    */ package com.zimbra.cs.ldap.unboundid;
/*    */ 
/*    */ import com.unboundid.asn1.ASN1OctetString;
/*    */ import com.unboundid.ldap.sdk.Attribute;
/*    */ import com.unboundid.ldap.sdk.schema.Schema;
/*    */ import com.zimbra.common.util.ByteUtil;
/*    */ import com.zimbra.cs.ldap.LdapUtil;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class UBIDUtil
/*    */ {
/*    */   static ASN1OctetString newASN1OctetString(boolean isBinary, String value)
/*    */   {
/* 29 */     if (isBinary) {
/* 30 */       return new ASN1OctetString(ByteUtil.decodeLDAPBase64(value));
/*    */     }
/* 32 */     return new ASN1OctetString(value);
/*    */   }
/*    */   
/*    */   static Attribute newAttribute(boolean isBinaryTransfer, String attrName, ASN1OctetString value)
/*    */   {
/* 37 */     String transferAttrName = LdapUtil.attrNameToBinaryTransferAttrName(isBinaryTransfer, attrName);
/* 38 */     return new Attribute(transferAttrName, new ASN1OctetString[] { value });
/*    */   }
/*    */   
/*    */   static Attribute newAttribute(boolean isBinaryTransfer, String attrName, ASN1OctetString[] values) {
/* 42 */     String transferAttrName = LdapUtil.attrNameToBinaryTransferAttrName(isBinaryTransfer, attrName);
/* 43 */     return new Attribute(transferAttrName, (Schema)null, values);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/ldap/unboundid/UBIDUtil.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */